package controller.member;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.validation.BindException;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractCommandController;

import Bean.memberBean;
import dao.memberDao;

public class updateController extends AbstractCommandController{
	private memberDao dao;
	public void setDao(memberDao dao){
		this.dao = dao;
	}
	@Override
	protected ModelAndView handle(HttpServletRequest request,
			HttpServletResponse response, Object obj, BindException error)
			throws Exception {
		memberBean bean = (memberBean)obj;
		dao.update(bean);
		return new ModelAndView("redirect:/startHome.main");
	}
	
}
